package com.learn.game_challenger.UI;

import com.learn.game_challenger.entity.role;
import com.learn.game_challenger.service.behavior;

import java.util.Scanner;
public class chooseUp {

    public static void ChooseUp(role challenger, role boss) {
        // 创建一个 Behavior 对象
        behavior behavior = new behavior(challenger, boss);

        System.out.println("请选择升级选项：");
        System.out.println("1. 生命值+20");
        System.out.println("2. 攻击力+5");
        System.out.println("3. 防御力+5");
        System.out.print("请输入选项 (1/2/3): ");

        Scanner scanner = new Scanner(System.in);
        int index = scanner.nextInt();

        behavior.upgrade(challenger, index);
        System.out.println("升级后的角色信息: ");
        System.out.println("名称: " + challenger.getName());
        System.out.println("攻击力: " + challenger.getAttack());
        System.out.println("防御力: " + challenger.getDefense());
        System.out.println("生命值: " + challenger.getHealth());

    }
}
